파일명 정렬 프로그래머스 | 파일명정렬 function solution(files) { let fileWrap = files.map((file, index) => ({ file, index }));//{file:file, index:index} const compare = (a, b) => { const reg = /(\D*)([0-9]*)/i; const A = a.match(reg);//['abd123','abc'.'123']... 정렬정규식JavaScriptmatch파일명 정렬프로그래머스JavaScript
프로그래머스 | 파일명정렬 function solution(files) { let fileWrap = files.map((file, index) => ({ file, index }));//{file:file, index:index} const compare = (a, b) => { const reg = /(\D*)([0-9]*)/i; const A = a.match(reg);//['abd123','abc'.'123']... 정렬정규식JavaScriptmatch파일명 정렬프로그래머스JavaScript